#-*- coding:utf-8 -*-

from util import *
import pymongo
from pymongo.database import ObjectId

def getMongo():
    mCon = pymongo.MongoClient('localhost', 27017)
    db_name = 'SmartParker'
    mDB = mCon[db_name]
    return (mDB, mCon)

def closeMongo(con):
    con.close()
